The present invention relates to the field of computer-generated imagery (CGI) and animation, and more particularly to techniques for maintaining continuity of animation across discrete animation changes.
Animation tools generally provide animators different sets of tools that enable animators to perform animation. The animator may use the tools to animate various models. A model is generally a collection of geometric primitives, mathematical representations, and other information that is used to describe the shape and behavior of an object. Each model may comprise controls (or articulated variables or “avars”) for which values may be specified that pose the model, i.e., position and orient its collection of geometric primitives. An animation is simply providing, for each avar in the model, a value at each instant in time over which the animation is to occur. The set of values for the avars may be stored, e.g., in a database, and is sometimes referred to as the “cue” or “animation cue”.
An animator may select a particular set of controls for the animation based upon the model to be animated, the type of animation to be performed, etc. Accordingly, animators frequently need to switch between different sets of controls “on the fly” in the course of an animation. For example, the animator may switch from using a set of controls that enable the animator to specify animation using forward kinematics to a set of controls that enable the animator to specify animation using inverse kinematics, and vice versa. A switch from one set of controls to another introduces a discontinuity in the animation that may cause irregularities in the resultant animation (e.g., cause an object being animated to “jump” in the animation). Such discontinuities (or jumps) in an object's motion are generally unacceptable in film-quality animation.
As part of the animation, animators also have to frequently enable and disable constraints between two or more objects (represented by models) being animated. Each time a constraint is changed, the interpretation of a model's controls (avars) may change; thus resulting in the same continuity problem as described above for switching control sets.
The following scenarios illustrate the manner in which a discontinuity is introduced when two objects (represented by models) are constrained together during the animation. Assume that a scene is being animated where a Man and a Bus (both represented by models) are moving to the right (i.e., in the positive X direction) at time t1 and the Man is chasing the Bus. Then, at time t2, the Man catches the Bus and is subsequently constrained (parented) to the Bus. The animation can thus be considered as comprising two parts: before the objects (i.e., the Man and the Bus) are constrained, and after the objects are constrained.
FIG. 1A depicts the positions of the objects being animated as a function of time. PosB represents the world space X position of the Bus and PosM represents the world space X position of the Man. FIG. 1B depicts splines representing the X-direction motions of the objects over time. A spline is generally a mathematical function that computes a value at any point in time by interpolating between a sequence of knots, which represent constraints on the function's value at specific points in time. According to an animation technique, animators specify an animation by creating and editing knots. XB represents the input avar (or control) of the Bus model that specifies the Bus's X position with respect to the Bus's parent's coordinate frame. XM represents the input avar (or control) of the Man model that specifies the Man's X position with respect to the Man's parent's coordinate frame. As shown, a constraint between the two objects is made at time t2. With respect to his own reference frame (i.e., XM), the Man moves until time t2, and then ceases his own motion (XM held constant as shown in FIG. 1B) as he is carried by the Bus thereafter. However, as shown in FIG. 1A, this produces a discontinuity in the Man's world space position (PosM) and causes the Man to “jump off” the Bus at precisely the time that the Man catches the Bus, as the Man's reference frame discontinuously changes from the world reference space to the Bus's reference space. The functions that PosM computes change discontinuously due to a change in the reference frame.
Conventionally, animators attempt to solve the discontinuity problem by manually calculating a compensated value for XM that is required to make the Man “stick” to the Bus, and write that value into the animation cue for XM. Let's assume, without loss of generality, that the manually computed compensation value is zero. FIGS. 2A and 2B represent the effect of the computed compensated value on the animation of the Man and Bus. In this scenario, as depicted in FIGS. 2A and 2B, the Man's motion after time t2 is correct (i.e., it is the same as the Bus's motion). However, the Man's pre-t2 motion of chasing the Bus has been subverted by driving the Man's world space position to zero at t2. As a result, before t2, the Man has a motion of approaching the Bus and then moving away from the Bus, and then magically popping to the Bus at time t2 (after t2, PosM is coincident with PosB).
Other conventional techniques attempt to rectify the above-discussed problems by introducing new animation controls (avars) for each of the models being animated. For example, extra avars are added to each model for each control set switch or constraint addition/deletion. Blending functions also have to be defined that allow an animator to blend motion gradually between otherwise discontinuous states. For example, in the previously described scenario, a new animation control XMB (the X position of the Man relative to the Bus) is defined for the Man and a blending function is defined for a blend interval around the time when the discontinuous change is introduced into the animation cue. The blending function is then used to compute the values of XM and XMB to enable smooth animation. However, this approach also has several problems associated with it. Although it reduces the “jump” in the animation, the object being animated (e.g., the Man) still moves over the blend interval, and it is up to the animator to manually minimize the amount of motion. Thus, the animator still has to manually finesse the animation across the constraint. These manual adjustments are generally quite complex and as a result quite time consuming. Further, this approach requires the addition of new controls (avars) to models being animated. This imposes a debilitating intellectual and managerial burden on animators.